package users;

import java.io.Serializable;

public class UserIdCard implements Comparable<UserIdCard>, Serializable
{
	private static final long serialVersionUID = 1L;
	private String id;
	
	public UserIdCard()
	{
		id = System.currentTimeMillis() + "" + (int)(Math.random() * Integer.MAX_VALUE);
	}
	
	public boolean equals(Object other)
	{
		if(other instanceof UserIdCard)
			return id.equals(((UserIdCard)other).id);
		return false;
	}

	public int compareTo(UserIdCard other)
	{
		return id.compareTo(other.id);
	}
}
